History log of /u-boot/tools/patman/checkpatch.py
Revision Date Author Comments
# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 00d54ae8 08-Mar-2023 Simon Glass <sjg@chromium.org>

patman: Check patches in parallel

For large series this can take a while. Run checkpatch in parallel to
try to reduce the time. The checkpatch information is still reported in
sequential order, so a very slow patch at the start can still slow
things down. But overall this gives good results.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>


# 4583c002 23-Feb-2023 Simon Glass <sjg@chromium.org>

patman: Move library functions into a library directory

The patman directory has a number of modules which are used by other tools
in U-Boot. This makes it hard to package the tools using pypi since the
common files must be copied along with the tool that uses them.

To address this, move these files into a new u_boot_pylib library. This
can be packaged separately and listed as a dependency of each tool.

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# da413b56 13-Jan-2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>

Revert "patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'"

This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.

Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 648d8186 19-Dec-2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>

patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# dce4322c 19-Jul-2022 Douglas Anderson <dianders@chromium.org>

patman: By default don't pass "--no-tree" to checkpatch for linux

When you pass "--no-tree" to checkpatch it disables some extra checks
that are important for Linux. Specifically I want checks like:

warning: DT compatible string "boogie,woogie" appears un-documented
check ./Documentation/devicetree/bindings/

Let's make the default for Linux to _not_ pass --no-tree. We'll have a
config option and command line flag to override.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 32cc6ae2 11-Feb-2022 Simon Glass <sjg@chromium.org>

patman: Correct pylint errors

Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 252ac589 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Rename Color() method to build()

This method has the same name as its class which is confusing. It is also
annoying when searching the code.

It builds a string with a colour, so rename it to build().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0157b187 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in gitutil.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ae5e9265 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in checkpatch.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d9800699 29-Jan-2022 Simon Glass <sjg@chromium.org>

patman: Convert camel case in command.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# ec6db6c2 31-Mar-2021 Evan Benn <evanbenn@chromium.org>

patman: Parse checkpatch by message instead of by line

Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# b3348522 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Improve handling of files

Sometimes warnings are associated with a file and sometimes with the
patch as a whole. Update the regular expression to handle both cases,
even in emacs mode. Also add support for detecting new files.

Signed-off-by: Simon Glass <sjg@chromium.org>


# b5e18813 29-Oct-2020 Simon Glass <sjg@chromium.org>

patman: Don't ignore lines starting with hash

These lines can indicate a continuation of an error and should not be
ignored. Fix this.

Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code")

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b04e8 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# f3653759 05-Jul-2020 Simon Glass <sjg@chromium.org>

patman: Move main code out to a control module

To make testing easier, move the code out from main into a separate
'control' module and split it into four parts: setup, preparing patches,
checking patches and emailing patches.

Add comments and fix a few code-style issues while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 89fb8b75 14-Jun-2020 Simon Glass <sjg@chromium.org>

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 96daa41a 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Complain if a checkpatch line is not understood

Rather than suffering in silence, output a warning if something about the
checkpatch output cannot be understood.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 37f3bb53 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support warnings in the patch subject

Sometimes checkpatch outputs problems in the patch subject. Add support
for parsing this output and reporting it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 666eb15e 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch output with notes and code

If checkpatch is configured to output code we should ignore it. Similarly,
notes should be ignored.

Update the logic to handle these situations.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7175b085 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Don't try to process checkpatch lines twice

Once we have determined what the line refers to there is no point in
processing it further. Update the logic to continue to the next line in
these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7d5b5e89 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Support emacs mode with checkpatch

If checkpatch is run in 'emacs' mode it shows the filename at the
start of each line. Add support for this so that the warnings and errors
are correctly detected.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 870bd567 06-May-2020 Simon Glass <sjg@chromium.org>

patman: Fix 'warning' typo

If no warnings are detected due to checkpatch having unexpected options,
patman currently shows an error:

TypeError: unsupported operand type(s) for +=: 'int' and 'property'

Fix this by initing the variable correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# bf776679 17-Apr-2020 Simon Glass <sjg@chromium.org>

patman: Move to absolute imports

At present patman sets the python path on startup so that it can access
the libraries it needs. If we convert to use absolute imports this is not
necessary.

Move patman to use absolute imports. This requires changes in tools which
use the patman libraries (which is most of them).

Signed-off-by: Simon Glass <sjg@chromium.org>


# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 8aa41363 17-Jan-2017 Simon Glass <sjg@chromium.org>

patman: Format checkpatch messages for IDE throwback

It is convenient to be able to deal with checkpatch warnings in the same
way as build warnings. Tools such as emacs and kate can quickly locate
the source file and line automatically.

To achieve this, adjust the format to match the C compiler, and output to
stderr.

Signed-off-by: Simon Glass <sjg@chromium.org>


# a920a17b 27-Sep-2016 Paul Burton <paul.burton@imgtec.com>

patman: Make print statements python 3.x safe

In python 3.x, print must be used as a function call. Convert all print
statements to the function call style, importing from __future__ where
we print with no trailing newline or print to a file object.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Simon Glass <sjg@chromium.org>


# 785f1548 25-Jul-2016 Simon Glass <sjg@chromium.org>

patman: Adjust command.Output() to raise an error by default

It is more useful to have this method raise an error when something goes
wrong. Make this the default and adjust the few callers that don't want to
use it this way.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 31e2141d 15-Aug-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

tools, scripts: refactor error-out statements of Python scripts

In Python, sys.exit() function can also take an object other
than an integer.

If an integer is given to the argument, Python exits with the return
code of it. If a non-integer argument is given, Python outputs it
to stderr and exits with the return code of 1.

That means,

print >> sys.stderr, "Blah Blah"
sys.exit(1)

is equivalent to

sys.exit("Blah Blah")

The latter is a useful shorthand.

Note:
Some error messages in Buildman and Patman were output to stdout.
But they should go to stderr. They are also fixed by this commit.
This is a nice side effect.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>


# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>


# d29fe6e2 26-Mar-2013 Simon Glass <sjg@chromium.org>

patman: Fix up checkpatch parsing to deal with 'CHECK' lines

checkpatch has a new type of warning, a 'CHECK'. At present patman fails
with these, which makes it less than useful.

Add support for checks, making it backwards compatible with the old
checkpatch.

At the same time, clean up formatting of the CheckPatches() output,
fix erroneous "internal error" if multiple patches have warnings and
be more robust to new types of problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>


# 99adf6ed 09-Jan-2013 Vadim Bendebury <vbendeb@chromium.org>

patman: Allow use outside of u-boot tree

To make it usable in git trees not providing a patch checker
implementation, add a command line option, allowing to suppress patch
check. While we are at it, sort debug options alphabetically.

Also, do not raise an exception if checkpatch.pl is not found - just
print an error message suggesting to use the new option, and return
nonzero status.

. unit test passes:
$ ./patman -t
<unittest.result.TestResult run=7 errors=0 failures=0>
. successfully used patman in the autotest tree to generate a patch
email (with --no-check option)
. successfully used patman in the u-boot tree to generate a patch
email
. `patman --help' now shows command line options ordered
alphabetically

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Acked-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>


# d96ef37d 26-Nov-2012 Doug Anderson <dianders@chromium.org>

patman: Look for checkpatch in the scripts directory

The Linux kernel stores checkpatch.pl in the scripts directory. Add
that to the search path to make things more automatic for kernel
development.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>


# afb9bf55 27-Sep-2012 Simon Glass <sjg@chromium.org>

patman: Handle checkpatch.pl not providing file/line info

Sometimes we don't get a valid filename or line number from checkpatch.pl,
for example if the patch is in a bad format. Deal with this by using a
default value, rather than a stack trace.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 0d24de9d 14-Jan-2012 Simon Glass <sjg@chromium.org>

Add 'patman' patch generation, checking and submission script

What is this?

=============

This tool is a Python script which:
- Creates patch directly from your branch
- Cleans them up by removing unwanted tags
- Inserts a cover letter with change lists
- Runs the patches through checkpatch.pl and its own checks
- Optionally emails them out to selected people

It is intended to automate patch creation and make it a less
error-prone process. It is useful for U-Boot and Linux work so far,
since it uses the checkpatch.pl script.

It is configured almost entirely by tags it finds in your commits.
This means that you can work on a number of different branches at
once, and keep the settings with each branch rather than having to
git format-patch, git send-email, etc. with the correct parameters
each time. So for example if you put:

in one of your commits, the series will be sent there.

See the README file for full details.
END

Signed-off-by: Simon Glass <sjg@chromium.org>